DESTDIR = 
CC = @CC@
ACM_HOME = @ACM_HOME@
LIBDIR = $(ACM_HOME)/lib
INSTALL = @INSTALL@
LN_S = @LN_S@
JAVA_HOME = @JAVA_HOME@
OS_NAME = @OS_NAME@
OS_ARCH = @OS_ARCH@
JDKLIB = -I$(JAVA_HOME)/include/
JDKOSLIB = -I$(JAVA_HOME)/include/$(OS_NAME)/
JVMLINK = -L$(JAVA_HOME)/jre/lib/$(OS_ARCH)/server

all:
	$(CC)                                  -Wall -shared -fPIC -v acmclient.c                -o libACMClient.so
	$(CC) $(JDKLIB) $(JDKOSLIB) $(JVMLINK) -Wall -shared -fPIC -v jniclient.c getJNIOption.c -o libJNIClient.so -ljvm

install:
	mkdir $(LIBDIR)
	$(INSTALL) libACMClient.so $(LIBDIR)/
	$(INSTALL) libJNIClient.so $(LIBDIR)/

deinstall:
	rm $(LIBDIR)/libACMClient.so
	rm $(LIBDIR)/libJNIClient.so
	rm -rv $(LIBDIR)

clean:
	rm libACMClient.so
	rm libJNIClient.so
	

